package com.test.dao;

import com.test.entity.CompAllInfoDto;
import com.test.entity.RecruitDto;
import com.test.entity.StuAllInfoDto;
import com.test.entity.TimeTableDto;

public class StuOperatProvider {



    public String selectcompYuyueInfo(String stu_acount,String acount,String wangshenjob){
        StringBuilder sql = new StringBuilder();
        sql.append(" update table_compattentstu_info set attent_status = 4 where 1=1");

        if(acount!=null&&!"".equals(acount)){
            sql.append(" and u_acount = '"+acount+"'");
        }else{
            sql.append(" and u_acount = '"+0+"'");
        }
        if(stu_acount!=null&&!"".equals(stu_acount)){
            sql.append(" and comp_acount = '"+stu_acount+"'");
        }else{
            sql.append(" and comp_acount = '"+0+"'");
        }
        if(wangshenjob!=null&&!"".equals(wangshenjob)){
            sql.append(" and wangshenjob = '"+wangshenjob+"'");
        }else{
            sql.append(" and wangshenjob = '"+0+"'");
        }
        return sql.toString();
    }


    public String selectcompYuyuemianInfo(String stu_acount,String acount,String wangshenjob){
        StringBuilder sql = new StringBuilder();
        sql.append(" update table_compattentstu_info set attent_status = 6 where 1=1");

        if(acount!=null&&!"".equals(acount)){
            sql.append(" and u_acount = '"+acount+"'");
        }else{
            sql.append(" and u_acount = '"+0+"'");
        }
        if(stu_acount!=null&&!"".equals(stu_acount)){
            sql.append(" and comp_acount = '"+stu_acount+"'");
        }else{
            sql.append(" and comp_acount = '"+0+"'");
        }
        if(wangshenjob!=null&&!"".equals(wangshenjob)){
            sql.append(" and wangshenjob = '"+wangshenjob+"'");
        }else{
            sql.append(" and wangshenjob = '"+0+"'");
        }
        return sql.toString();
    }



    public String scanLogin(String wx_acount) {
        StringBuilder sql = new StringBuilder();
        sql.append(" select u_acount from table_wxacount where 1=1");
        if (wx_acount != null && !"".equals(wx_acount)) {
            sql.append(" and wx_acount = '" + wx_acount + "'");
        } else {
            sql.append(" and wx_acount = '" + 0 + "'");
        }

        return sql.toString();
    }

    public String insertXtUser(String u_acount, String wx_acount) {
        StringBuilder sql = new StringBuilder();
        sql.append(" insert into table_wxacount(u_acount,wx_acount) values( ");
        if (u_acount != null && !"".equals(u_acount)) {
            sql.append("'" + u_acount + "',");
        } else {
            sql.append("'" + 0 + "',");
        }
        if (wx_acount != null && !"".equals(wx_acount)) {
            sql.append("'" + wx_acount + "'");
        } else {
            sql.append("'" + 0 + "'");
        }
        sql.append(")");
        return sql.toString();
    }



    public String selectStuAcount(String stu_code) {
        StringBuilder sql = new StringBuilder();
        sql.append(" select u_acount from table_stustatus_info where 1=1");
        if (stu_code != null && !"".equals(stu_code)) {
            sql.append(" and stu_code = '" + stu_code + "'");
        } else {
            sql.append(" and stu_code = '" + 0 + "'");
        }

        return sql.toString();
    }

    public String selectStuCode(String u_acount) {
        StringBuilder sql = new StringBuilder();
        sql.append(" select u_codepath from table_codepath where 1=1");
        if (u_acount != null && !"".equals(u_acount)) {
            sql.append(" and u_acount = '" + u_acount + "'");
        } else {
            sql.append(" and u_acount = '" + 0 + "'");
        }

        return sql.toString();
    }


    public String getUpassword(String u_acount) {
        StringBuilder sql = new StringBuilder();
        sql.append(" select u_password from table_user where 1=1");
        if (u_acount != null && !"".equals(u_acount)) {
            sql.append(" and u_acount = '" + u_acount + "'");
        } else {
            sql.append(" and u_acount = '" + 0 + "'");
        }

        return sql.toString();
    }

    public String delbangdingxitong(String wx_acount) {
        StringBuilder sql = new StringBuilder();
        sql.append(" delete from table_wxacount where 1=1");
        if (wx_acount != null && !"".equals(wx_acount)) {
            sql.append(" and wx_acount = '" + wx_acount + "'");
        } else {
            sql.append(" and wx_acount = '" + 0 + "'");
        }

        return sql.toString();
    }

    public String selectXtUser(String u_acount, String u_password) {
        StringBuilder sql = new StringBuilder();
        sql.append(" select * from table_user where 1=1");
        if (u_acount != null && !"".equals(u_acount)) {
            sql.append(" and u_acount = '" + u_acount + "'");
        } else {
            sql.append(" and u_acount = '" + 0 + "'");
        }

        if (u_password != null && !"".equals(u_password)) {
            sql.append(" and u_password = '" + u_password + "'");
        } else {
            sql.append(" and u_password = '" + 0 + "'");
        }

        return sql.toString();
    }


    public String selectUacount(String wx_acount) {
        StringBuilder sql = new StringBuilder();
        sql.append(" select u_acount from table_wxacount where 1=1");
        if (wx_acount != null && !"".equals(wx_acount)) {
            sql.append(" and wx_acount = '" + wx_acount + "'");
        } else {
            sql.append(" and wx_acount = '" + 0 + "'");
        }
        sql.append(" group by u_acount");

        return sql.toString();
    }

    public String checkAttentComp(String stu_acount) {
        StringBuilder sql = new StringBuilder();
        sql.append(" select comp_acount from table_stuattentcomp_info where 1=1");
        if (stu_acount != null && !"".equals(stu_acount)) {
            sql.append(" and u_acount = '" + stu_acount + "'");
        } else {
            sql.append(" and u_acount = '" + 0 + "'");
        }


        return sql.toString();
    }

    public String checkOnlineApplication(String stu_acount) {
        StringBuilder sql = new StringBuilder();
        sql.append(" select comp_acount from table_compattentstu_info where 1=1");
        if (stu_acount != null && !"".equals(stu_acount)) {
            sql.append(" and u_acount = '" + stu_acount + "'");
        } else {
            sql.append(" and u_acount = '" + 0 + "'");
        }


        return sql.toString();
    }

    public String selectAllComp(CompAllInfoDto compAllInfoDto) {
        StringBuilder sql = new StringBuilder();
        sql.append(" SELECT\n" +
                "\ttu.u_acount,\n" +
                "tu.u_status,\n" +
                "tcbi.comp_address,\n" +
                "tcbi.comp_city,\n" +
                "tcbi.comp_code,\n" +
                "tcbi.comp_contact,\n" +
                "tcbi.comp_contacttel,\n" +
                "tcbi.comp_county,\n" +
                "tcbi.comp_email,\n" +
                "tcbi.comp_kind,\n" +
                "tcbi.comp_name,\n" +
                "tcbi.comp_nature,\n" +
                "tcbi.comp_province,\n" +
                "tcri.comp_cecruit,\n" +
                "tcri.comp_profile,\n" +
                "tcri.comp_salary\n" +
                "\n" +
                "FROM\n" +
                "\ttable_user tu\n" +
                "LEFT JOIN table_compbase_info tcbi on tu.u_acount = tcbi.u_acount\n" +
                "LEFT JOIN table_comprecruit_info tcri on tcbi.u_acount = tcri.u_acount\n" +
                "WHERE\n" +

                "tu.u_Identity = '4' and  tcbi.comp_name is not null");
        if (compAllInfoDto.getComp_name() != null && !"".equals(compAllInfoDto.getComp_name())) {
            sql.append(" and tcbi.comp_name like '%" + compAllInfoDto.getComp_name() + "%'");
        }
        if (compAllInfoDto.getComp_cecruit() != null && !"".equals(compAllInfoDto.getComp_cecruit())) {
            sql.append(" and tcri.comp_cecruit like '%" + compAllInfoDto.getComp_cecruit() + "%'");
        }
        if (compAllInfoDto.getU_acount() != null && !"".equals(compAllInfoDto.getU_acount())) {
            sql.append(" and tu.u_acount like '%" + compAllInfoDto.getU_acount() + "%'");
        }
        return sql.toString();
    }


    public String selectAllMenHuInfo(RecruitDto recruitDto) {
        StringBuilder sql = new StringBuilder();
        sql.append(" select \n" +
                "recruit_address,\n" +
                "recruit_id,\n" +
                "recruit_job,\n" +
                "recruit_material,\n" +
                "recruit_name,\n" +
                "recruit_people,\n" +
                "recruit_peopletel,\n" +
                "recruit_salary,\n" +
                "recruit_time,\n" +
                "recruit_updatetime\n" +
                " from table_releasejob_info where 1=1 ");
        if (recruitDto.getComp_name() != null && !"".equals(recruitDto.getComp_name())) {
            sql.append(" and recruit_name like '%" + recruitDto.getComp_name() + "%'");
        }
        if (recruitDto.getComp_cecruit() != null && !"".equals(recruitDto.getComp_cecruit())) {
            sql.append(" and recruit_job like '%" + recruitDto.getComp_cecruit() + "%'");
        }
        sql.append(" order by recruit_time desc");
        return sql.toString();
    }

    public String selectAttentAllComp(CompAllInfoDto compAllInfoDto, String acount) {
        StringBuilder sql = new StringBuilder();
        sql.append("SELECT\n" +
                "tu.u_acount,\n" +
                "\ttcbi.comp_address,\n" +
                "\ttcbi.comp_city,\n" +
                "\ttcbi.comp_code,\n" +
                "\ttcbi.comp_contact,\n" +
                "\ttcbi.comp_contacttel,\n" +
                "\ttcbi.comp_county,\n" +
                "\ttcbi.comp_email,\n" +
                "\ttcbi.comp_kind,\n" +
                "\ttcbi.comp_name,\n" +
                "\ttcbi.comp_nature,\n" +
                "\ttcbi.comp_province,\n" +
                "\ttcri.comp_cecruit,\n" +
                "\ttcri.comp_profile,\n" +
                "\ttcri.comp_salary\n" +
                "\t\n" +
                "FROM\n" +
                "\ttable_user tu\n" +
                "LEFT JOIN table_compbase_info tcbi ON tu.u_acount = tcbi.u_acount\n" +
                "LEFT JOIN table_comprecruit_info tcri ON tcbi.u_acount = tcri.u_acount\n" +
                "right JOIN table_stuattentcomp_info tstti ON tu.u_acount = tstti.comp_acount\n" +
                "WHERE\n" +
                "\ttu.u_Identity = '4'");
        if (acount != null && !"".equals(acount)) {
            sql.append(" and tstti.u_acount = '" + acount + "'");
        } else {
            sql.append(" and tstti.u_acount = '" + 0 + "'");
        }

        sql.append("   GROUP BY tstti.comp_acount");

        return sql.toString();
    }

    public String selectOnline(String acount) {
        StringBuilder sql = new StringBuilder();
        sql.append("SELECT\n" +
                "                tu.u_acount,\n" +
                "                tu.u_status,\n" +
                "                tcbi.comp_address,\n" +
                "                tcbi.comp_city,\n" +
                "                tcbi.comp_code,\n" +
                "                tcbi.comp_contact,\n" +
                "                tcbi.comp_contacttel,\n" +
                "                tcbi.comp_county,\n" +
                "                tcbi.comp_email,\n" +
                "                tcbi.comp_kind,\n" +
                "                tcbi.comp_name,\n" +
                "                tcbi.comp_nature,\n" +
                "                tcbi.comp_province,\n" +
                "                tcri.comp_cecruit,\n" +
                "                tcri.comp_profile,\n" +
                "                tcri.comp_salary,\n" +
                "                tati.wangshenjob,\n" +
                "\t\t\t\t\t\t\t\ttati.attent_status\n" +
                "                FROM\n" +
                "                table_user tu\n" +
                "                LEFT JOIN table_compbase_info tcbi on tu.u_acount = tcbi.u_acount\n" +
                "                LEFT JOIN table_comprecruit_info tcri on tcbi.u_acount = tcri.u_acount\n" +
                "                LEFT   JOIN table_compattentstu_info tati on tati.comp_acount = tu.u_acount  where 1=1");
        if (acount != null && !"".equals(acount)) {
            sql.append(" and tati.u_acount = '" + acount + "'");
        } else {
            sql.append(" and tati.u_acount = '" + 0 + "'");
        }


        return sql.toString();
    }

    public String selectStuName(String acount) {
        StringBuilder sql = new StringBuilder();
        sql.append("select stu_name  from table_stubase_info where 1=1");
        if (acount != null && !"".equals(acount)) {
            sql.append("  and u_acount = '" + acount + "'");
        } else {
            sql.append("  and u_acount = " + 0 + "");
        }
        sql.append(" group by u_acount");
        return sql.toString();
    }


    public String selectAttentByacount(String acount) {
        StringBuilder sql = new StringBuilder();
        sql.append("select stu_name,comp_name  from table_stuattentcomp_info where 1=1");
        if (acount != null && !"".equals(acount)) {
            sql.append("  and u_acount = '" + acount + "'");
        } else {
            sql.append("  and u_acount = " + 0 + "");
        }
        sql.append(" group by u_acount");
        return sql.toString();
    }

    public String wxselectStuInfoByWx(String wx_acount) {
        StringBuilder sql = new StringBuilder();
        sql.append("SELECT\n" +
                "\ttssi.stu_class,\n" +
                "\ttssi.stu_code,\n" +
                "\ttssi.stu_department,\n" +
                "\ttssi.stu_education,\n" +
                "\ttssi.stu_inTime,\n" +
                "\ttssi.stu_inway,\n" +
                "\ttssi.stu_outTime,\n" +
                "\ttssi.stu_profession,\n" +
                "\ttssi.stu_schoolname,\n" +
                "\ttsbi.stu_address,\n" +
                "\ttsbi.stu_city,\n" +
                "\ttsbi.stu_politics,\n" +
                "\ttsbi.stu_counselor,\n" +
                "\ttsbi.stu_county,\n" +
                "\ttsbi.stu_ec,\n" +
                "\ttsbi.stu_ectel,\n" +
                "\ttsbi.stu_email,\n" +
                "\ttsbi.stu_province,\n" +
                "\ttsbi.stu_fromaddress,\n" +
                "\ttsbi.stu_fromcity,\n" +
                "\ttsbi.stu_fromprovince,\n" +
                "\ttsbi.stu_idcard,\n" +
                "\ttsbi.stu_sex,\n" +
                "\ttsbi.stu_tel,\n" +
                "\ttsbi.stu_name,\n" +
                "\ttsbi.stu_qq,\n" +
                "\ttsji.stu_compaddress,\n" +
                "\ttsji.stu_compagreement,\n" +
                "\ttsji.stu_compcity,\n" +
                "\ttsji.stu_compcode,\n" +
                "\ttsji.stu_compcounty,\n" +
                "\ttsji.stu_compjob,\n" +
                "\ttsji.stu_compjobguide,\n" +
                "\ttsji.stu_compjobstatus,\n" +
                "\ttsji.stu_compkind,\n" +
                "\ttsji.stu_compname,\n" +
                "\ttsji.stu_compnature,\n" +
                "\ttsji.stu_updateagreement,\n" +
                "\ttsri.stu_resume_community_name,\n" +
                "\ttsri.stu_resume_community_position,\n" +
                "\ttsri.stu_resume_community_intime,\n" +
                "\ttsri.stu_resume_community_outtime,\n" +
                "\ttsri.stu_resume_community_description,\n" +
                "\ttsri.stu_resume_practice_name,\n" +
                "\ttsri.stu_resume_practice_position,\n" +
                "\ttsri.stu_resume_practice_intime,\n" +
                "\ttsri.stu_resume_practice_outtime,\n" +
                "\ttsri.stu_resume_practice_description,\n" +
                "\ttsri.stu_resume_search,\n" +
                "\ttsri.stu_resume_salary,\n" +
                "\ttsri.stu_resume_address,\n" +
                "\ttsri.stu_resume_awards,\n" +
                "\ttsri.stu_resume_skills,\n" +
                "\ttsri.stu_resume_evaluation,\n" +
                "tx.u_acount\n" +
                "FROM\n" +
                "\ttable_user tu\n" +
                "right  JOIN table_stubase_info tsbi ON tu.u_acount = tsbi.u_acount\n" +
                "LEFT JOIN table_stustatus_info tssi ON tu.u_acount = tssi.u_acount\n" +
                "LEFT JOIN table_stujob_info tsji ON tu.u_acount = tsji.u_acount\n" +
                "LEFT JOIN table_sturesume_info tsri ON tu.u_acount = tsri.u_acount\n" +
                "RIGHT  JOIN table_wxacount tx on tu.u_acount = tx.u_acount\n");
        if (wx_acount != null && !"".equals(wx_acount)) {
            sql.append("  where tx.wx_acount = '" + wx_acount + "'");
        } else {
            sql.append("  where tx.wx_acount = " + 0 + "");
        }
        sql.append(" GROUP BY  tu.u_acount");
        return sql.toString();
    }

    public String selectStuByAcount(String acount) {
        StringBuilder sql = new StringBuilder();
        sql.append("SELECT\n" +
                "\ttssi.stu_class,\n" +
                "\ttssi.stu_code,\n" +
                "\ttssi.stu_department,\n" +
                "\ttssi.stu_education,\n" +
                "\ttssi.stu_inTime,\n" +
                "\ttssi.stu_inway,\n" +
                "\ttssi.stu_outTime,\n" +
                "\ttssi.stu_profession,\n" +
                "\ttssi.stu_schoolname,\n" +
                "\ttsbi.stu_address,\n" +
                "\ttsbi.stu_city,\n" +
                "\ttsbi.stu_politics,\n" +
                "\ttsbi.stu_counselor,\n" +
                "\ttsbi.stu_county,\n" +
                "\ttsbi.stu_ec,\n" +
                "\ttsbi.stu_ectel,\n" +
                "\ttsbi.stu_email,\n" +
                "\ttsbi.stu_province,\n" +
                "\ttsbi.stu_fromaddress,\n" +
                "\ttsbi.stu_fromcity,\n" +
                "\ttsbi.stu_fromprovince,\n" +
                "\ttsbi.stu_idcard,\n" +
                "\ttsbi.stu_sex,\n" +
                "\ttsbi.stu_tel,\n" +
                "\ttsbi.stu_name,\n" +
                "\ttsbi.stu_qq,\n" +
                "\ttsji.stu_compaddress,\n" +
                "\ttsji.stu_compagreement,\n" +
                "\ttsji.stu_compcity,\n" +
                "\ttsji.stu_compcode,\n" +
                "\ttsji.stu_compcounty,\n" +
                "\ttsji.stu_compjob,\n" +
                "\ttsji.stu_compjobguide,\n" +
                "\ttsji.stu_compjobstatus,\n" +
                "\ttsji.stu_compkind,\n" +
                "\ttsji.stu_compname,\n" +
                "\ttsji.stu_compnature,\n" +
                "\ttsji.stu_updateagreement,\n" +
                "\ttsri.stu_resume_community_name,\n" +
                "\ttsri.stu_resume_community_position,\n" +
                "\ttsri.stu_resume_community_intime,\n" +
                "\ttsri.stu_resume_community_outtime,\n" +
                "\ttsri.stu_resume_community_description,\n" +
                "\ttsri.stu_resume_practice_name,\n" +
                "\ttsri.stu_resume_practice_position,\n" +
                "\ttsri.stu_resume_practice_intime,\n" +
                "\ttsri.stu_resume_practice_outtime,\n" +
                "\ttsri.stu_resume_practice_description,\n" +
                "\ttsri.stu_resume_search,\n" +
                "\ttsri.stu_resume_salary,\n" +
                "\ttsri.stu_resume_address,\n" +
                "\ttsri.stu_resume_awards,\n" +
                "\ttsri.stu_resume_skills,\n" +
                "\ttsri.stu_resume_evaluation\n" +
                "FROM\n" +
                "\ttable_user tu\n" +
                "LEFT JOIN table_stubase_info tsbi ON tu.u_acount = tsbi.u_acount\n" +
                "LEFT JOIN table_stustatus_info tssi on tu.u_acount = tssi.u_acount\n" +
                "LEFT JOIN table_stujob_info tsji on tu.u_acount = tsji.u_acount\n" +
                "LEFT JOIN table_sturesume_info tsri on  tu.u_acount = tsri.u_acount");
        if (acount != null && !"".equals(acount)) {
            sql.append("  where tu.u_acount = '" + acount + "'");
        } else {
            sql.append("  where tu.u_acount = " + 0 + "");
        }
        sql.append(" GROUP BY  tu.u_acount");
        return sql.toString();
    }


    public String selectStuByStuCode(String stu_code) {
        StringBuilder sql = new StringBuilder();
        sql.append("SELECT\n" +
                "\ttssi.stu_class,\n" +
                "\ttssi.stu_code,\n" +
                "\ttssi.stu_department,\n" +
                "\ttssi.stu_education,\n" +
                "\ttssi.stu_inTime,\n" +
                "\ttssi.stu_inway,\n" +
                "\ttssi.stu_outTime,\n" +
                "\ttssi.stu_profession,\n" +
                "\ttssi.stu_schoolname,\n" +
                "\ttsbi.stu_address,\n" +
                "\ttsbi.stu_city,\n" +
                "\ttsbi.stu_politics,\n" +
                "\ttsbi.stu_counselor,\n" +
                "\ttsbi.stu_county,\n" +
                "\ttsbi.stu_ec,\n" +
                "\ttsbi.stu_ectel,\n" +
                "\ttsbi.stu_email,\n" +
                "\ttsbi.stu_province,\n" +
                "\ttsbi.stu_fromaddress,\n" +
                "\ttsbi.stu_fromcity,\n" +
                "\ttsbi.stu_fromprovince,\n" +
                "\ttsbi.stu_idcard,\n" +
                "\ttsbi.stu_sex,\n" +
                "\ttsbi.stu_tel,\n" +
                "\ttsbi.stu_name,\n" +
                "\ttsbi.stu_qq,\n" +
                "\ttsji.stu_compaddress,\n" +
                "\ttsji.stu_compagreement,\n" +
                "\ttsji.stu_compcity,\n" +
                "\ttsji.stu_compcode,\n" +
                "\ttsji.stu_compcounty,\n" +
                "\ttsji.stu_compjob,\n" +
                "\ttsji.stu_compjobguide,\n" +
                "\ttsji.stu_compjobstatus,\n" +
                "\ttsji.stu_compkind,\n" +
                "\ttsji.stu_compname,\n" +
                "tu.u_acount,\n" +
                "\ttsji.stu_compnature,\n" +
                "\ttsji.stu_updateagreement,\n" +
                "\ttsri.stu_resume_community_name,\n" +
                "\ttsri.stu_resume_community_position,\n" +
                "\ttsri.stu_resume_community_intime,\n" +
                "\ttsri.stu_resume_community_outtime,\n" +
                "\ttsri.stu_resume_community_description,\n" +
                "\ttsri.stu_resume_practice_name,\n" +
                "\ttsri.stu_resume_practice_position,\n" +
                "\ttsri.stu_resume_practice_intime,\n" +
                "\ttsri.stu_resume_practice_outtime,\n" +
                "\ttsri.stu_resume_practice_description,\n" +
                "\ttsri.stu_resume_search,\n" +
                "\ttsri.stu_resume_salary,\n" +
                "\ttsri.stu_resume_address,\n" +
                "\ttsri.stu_resume_awards,\n" +
                "\ttsri.stu_resume_skills,\n" +
                "\ttsri.stu_resume_evaluation\n" +
                "FROM\n" +
                "\ttable_user tu\n" +
                "LEFT JOIN table_stubase_info tsbi ON tu.u_acount = tsbi.u_acount\n" +
                "LEFT JOIN table_stustatus_info tssi on tu.u_acount = tssi.u_acount\n" +
                "LEFT JOIN table_stujob_info tsji on tu.u_acount = tsji.u_acount\n" +
                "LEFT JOIN table_sturesume_info tsri on  tu.u_acount = tsri.u_acount");
        if (stu_code != null && !"".equals(stu_code)) {
            sql.append("  where tssi.stu_code = '" + stu_code + "'");
        } else {
            sql.append("  where tssi.stu_code = " + 0 + "");
        }
        sql.append(" GROUP BY  tu.u_acount");
        return sql.toString();
    }


    public String selectTimeTableInfo(String u_acount) {
        StringBuilder sql = new StringBuilder();
        sql.append("select Monday1,Tuesday1,Wednesday1,Thursday1,Friday1,Saturday1,Sunday1,Monday2,Tuesday2,Wednesday2,Thursday2,Friday2,Saturday2,Sunday2,Monday3,Tuesday3,Wednesday3,Thursday3,Friday3,Saturday3,Sunday3,Monday4,Tuesday4,Wednesday4,Thursday4,Friday4,Saturday4,Sunday4,Monday5,Tuesday5,Wednesday5,Thursday5,Friday5,Saturday5,Sunday5,u_acount from table_timetable_info ");
        if (u_acount != null && !"".equals(u_acount)) {
            sql.append("  where u_acount = '" + u_acount + "'");
        } else {
            sql.append("  where u_acount = " + 0 + "");
        }
        sql.append(" GROUP BY  u_acount");
        return sql.toString();
    }


    public String deleteStuResume(String acount) {
        StringBuilder sql = new StringBuilder();
        sql.append(" delete from table_sturesume_info ");
        sql.append(" where 1=1");
        if (acount != null && !"".equals(acount)) {
            sql.append("  and u_acount = '" + acount + "'");
        } else {
            sql.append("  and u_acount = '" + 0 + "'");
        }
        return sql.toString();
    }


    public String deleteTimeTableInfo(String acount) {
        StringBuilder sql = new StringBuilder();
        sql.append(" delete from table_timetable_info ");
        sql.append(" where 1=1");
        if (acount != null && !"".equals(acount)) {
            sql.append("  and u_acount = '" + acount + "'");
        } else {
            sql.append("  and u_acount = '" + 0 + "'");
        }
        return sql.toString();
    }


    public String cleanTimeTableInfo() {
        StringBuilder sql = new StringBuilder();
        sql.append(" delete from table_timetable_info ");
        return sql.toString();
    }


    public String insertCodePath(String acount,String pathName){
        StringBuilder sql = new StringBuilder();
        sql.append(" insert into table_codepath(u_acount,u_codepath) values( ");
        if(acount!=null&&!"".equals(acount)){
            sql.append("'"+acount+"',");
        }else{
            sql.append("'"+0+"',");
        }
        if(pathName!=null&&!"".equals(pathName)){
            sql.append("'"+pathName+"'");
        }else{
            sql.append("'"+0+"'");
        }
        sql.append(")");
        return sql.toString();
    }

    public String insertStuResume(StuAllInfoDto stuAllInfoDto){
        StringBuilder sql = new StringBuilder();
        sql.append(" insert into table_sturesume_info(stu_resume_community_name,stu_resume_community_position,stu_resume_community_intime,stu_resume_community_outtime,stu_resume_community_description,stu_resume_practice_name,stu_resume_practice_position,stu_resume_practice_intime,stu_resume_practice_outtime,stu_resume_practice_description,stu_resume_search,stu_resume_salary,stu_resume_address,stu_resume_awards,stu_resume_skills,stu_resume_evaluation,u_acount) values( ");
        if(stuAllInfoDto.getStu_resume_community_name()!=null&&!"".equals(stuAllInfoDto.getStu_resume_community_name())){
            sql.append("'"+stuAllInfoDto.getStu_resume_community_name()+"',");
        }else{
            sql.append("'"+0+"',");
        }
        if(stuAllInfoDto.getStu_resume_community_position()!=null&&!"".equals(stuAllInfoDto.getStu_resume_community_position())){
            sql.append("'"+stuAllInfoDto.getStu_resume_community_position()+"',");
        }else{
            sql.append("'"+0+"',");
        }

        if(stuAllInfoDto.getStu_resume_community_intime()!=null&&!"".equals(stuAllInfoDto.getStu_resume_community_intime())){
            sql.append("'"+stuAllInfoDto.getStu_resume_community_intime()+"',");
        }else{
            sql.append("'"+0+"',");
        }
        if(stuAllInfoDto.getStu_resume_community_outtime()!=null&&!"".equals(stuAllInfoDto.getStu_resume_community_outtime())){
            sql.append("'"+stuAllInfoDto.getStu_resume_community_outtime()+"',");
        }else{
            sql.append("'"+0+"',");
        }
        if(stuAllInfoDto.getStu_resume_community_description()!=null&&!"".equals(stuAllInfoDto.getStu_resume_community_description())){
            sql.append("'"+stuAllInfoDto.getStu_resume_community_description()+"',");
        }else{
            sql.append("'"+0+"',");
        }
        if(stuAllInfoDto.getStu_resume_practice_name()!=null&&!"".equals(stuAllInfoDto.getStu_resume_practice_name())){
            sql.append("'"+stuAllInfoDto.getStu_resume_practice_name()+"',");
        }else{
            sql.append("'"+0+"',");
        }
        if(stuAllInfoDto.getStu_resume_practice_position()!=null&&!"".equals(stuAllInfoDto.getStu_resume_practice_position())){
            sql.append("'"+stuAllInfoDto.getStu_resume_practice_position()+"',");
        }else{
            sql.append("'"+0+"',");
        }
        if(stuAllInfoDto.getStu_resume_practice_intime()!=null&&!"".equals(stuAllInfoDto.getStu_resume_practice_intime())){
            sql.append("'"+stuAllInfoDto.getStu_resume_practice_intime()+"',");
        }else{
            sql.append("'"+0+"',");
        }
        if(stuAllInfoDto.getStu_resume_practice_outtime()!=null&&!"".equals(stuAllInfoDto.getStu_resume_practice_outtime())){
            sql.append("'"+stuAllInfoDto.getStu_resume_practice_outtime()+"',");
        }else{
            sql.append("'"+0+"',");
        }
        if(stuAllInfoDto.getStu_resume_practice_description()!=null&&!"".equals(stuAllInfoDto.getStu_resume_practice_description())){
            sql.append("'"+stuAllInfoDto.getStu_resume_practice_description()+"',");
        }else{
            sql.append("'"+0+"',");
        }
        if(stuAllInfoDto.getStu_resume_search()!=null&&!"".equals(stuAllInfoDto.getStu_resume_search())){
            sql.append("'"+stuAllInfoDto.getStu_resume_search()+"',");
        }else{
            sql.append("'"+0+"',");
        }
        if(stuAllInfoDto.getStu_resume_salary()!=null&&!"".equals(stuAllInfoDto.getStu_resume_salary())){
            sql.append("'"+stuAllInfoDto.getStu_resume_salary()+"',");
        }else{
            sql.append("'"+0+"',");
        }
        if(stuAllInfoDto.getStu_resume_address()!=null&&!"".equals(stuAllInfoDto.getStu_resume_address())){
            sql.append("'"+stuAllInfoDto.getStu_resume_address()+"',");
        }else{
            sql.append("'"+0+"',");
        }
        if(stuAllInfoDto.getStu_resume_awards()!=null&&!"".equals(stuAllInfoDto.getStu_resume_awards())){
            sql.append("'"+stuAllInfoDto.getStu_resume_awards()+"',");
        }else{
            sql.append("'"+0+"',");
        }

        if(stuAllInfoDto.getStu_resume_skills()!=null&&!"".equals(stuAllInfoDto.getStu_resume_skills())){
            sql.append("'"+stuAllInfoDto.getStu_resume_skills()+"',");
        }else{
            sql.append("'"+0+"',");
        }

        if(stuAllInfoDto.getStu_resume_evaluation()!=null&&!"".equals(stuAllInfoDto.getStu_resume_evaluation())){
            sql.append("'"+stuAllInfoDto.getStu_resume_evaluation()+"',");
        }else{
            sql.append("'"+0+"',");
        }

        if(stuAllInfoDto.getU_acount()!=null&&!"".equals(stuAllInfoDto.getU_acount())){
            sql.append("'"+stuAllInfoDto.getU_acount()+"'");
        }else{
            sql.append("'"+0+"'");
        }

        sql.append(")");
        return sql.toString();
    }



    public String insertTimeTableInfo(TimeTableDto timeTableDto){
        StringBuilder sql = new StringBuilder();
        sql.append(" insert into table_timetable_info(Monday1,Tuesday1,Wednesday1,Thursday1,Friday1,Saturday1,Sunday1,Monday2,Tuesday2,Wednesday2,Thursday2,Friday2,Saturday2,Sunday2,Monday3,Tuesday3,Wednesday3,Thursday3,Friday3,Saturday3,Sunday3,Monday4,Tuesday4,Wednesday4,Thursday4,Friday4,Saturday4,Sunday4,Monday5,Tuesday5,Wednesday5,Thursday5,Friday5,Saturday5,Sunday5,u_acount) values( ");


        if(timeTableDto.getMonday1()!=null&&!"undefined".equals(timeTableDto.getMonday1())){
            sql.append("'"+timeTableDto.getMonday1()+"',");
        }else{
            sql.append("'"+0+"',");
        }
        if(timeTableDto.getTuesday1()!=null&&!"undefined".equals(timeTableDto.getTuesday1())){
            sql.append("'"+timeTableDto.getTuesday1()+"',");
        }else{
            sql.append("'"+0+"',");
        }
        if(timeTableDto.getWednesday1()!=null&&!"undefined".equals(timeTableDto.getWednesday1())){
            sql.append("'"+timeTableDto.getWednesday1()+"',");
        }else{
            sql.append("'"+0+"',");
        }
        if(timeTableDto.getThursday1()!=null&&!"undefined".equals(timeTableDto.getThursday1())){
            sql.append("'"+timeTableDto.getThursday1()+"',");
        }else{
            sql.append("'"+0+"',");
        }
        if(timeTableDto.getFriday1()!=null&&!"undefined".equals(timeTableDto.getFriday1())){
            sql.append("'"+timeTableDto.getFriday1()+"',");
        }else{
            sql.append("'"+0+"',");
        }
        if(timeTableDto.getSaturday1()!=null&&!"undefined".equals(timeTableDto.getSaturday1())){
            sql.append("'"+timeTableDto.getSaturday1()+"',");
        }else{
            sql.append("'"+0+"',");
        }
        if(timeTableDto.getSunday1()!=null&&!"undefined".equals(timeTableDto.getSunday1())){
            sql.append("'"+timeTableDto.getSunday1()+"',");
        }else{
            sql.append("'"+0+"',");
        }


        if(timeTableDto.getMonday2()!=null&&!"undefined".equals(timeTableDto.getMonday2())){
            sql.append("'"+timeTableDto.getMonday2()+"',");
        }else{
            sql.append("'"+0+"',");
        }
        if(timeTableDto.getTuesday2()!=null&&!"undefined".equals(timeTableDto.getTuesday2())){
            sql.append("'"+timeTableDto.getTuesday2()+"',");
        }else{
            sql.append("'"+0+"',");
        }
        if(timeTableDto.getWednesday2()!=null&&!"undefined".equals(timeTableDto.getWednesday2())){
            sql.append("'"+timeTableDto.getWednesday2()+"',");
        }else{
            sql.append("'"+0+"',");
        }
        if(timeTableDto.getThursday2()!=null&&!"undefined".equals(timeTableDto.getThursday2())){
            sql.append("'"+timeTableDto.getThursday2()+"',");
        }else{
            sql.append("'"+0+"',");
        }
        if(timeTableDto.getFriday2()!=null&&!"undefined".equals(timeTableDto.getFriday2())){
            sql.append("'"+timeTableDto.getFriday2()+"',");
        }else{
            sql.append("'"+0+"',");
        }
        if(timeTableDto.getSaturday2()!=null&&!"undefined".equals(timeTableDto.getSaturday2())){
            sql.append("'"+timeTableDto.getSaturday2()+"',");
        }else{
            sql.append("'"+0+"',");
        }
        if(timeTableDto.getSunday2()!=null&&!"undefined".equals(timeTableDto.getSunday2())){
            sql.append("'"+timeTableDto.getSunday2()+"',");
        }else{
            sql.append("'"+0+"',");
        }



        if(timeTableDto.getMonday3()!=null&&!"undefined".equals(timeTableDto.getMonday3())){
            sql.append("'"+timeTableDto.getMonday3()+"',");
        }else{
            sql.append("'"+0+"',");
        }
        if(timeTableDto.getTuesday3()!=null&&!"undefined".equals(timeTableDto.getTuesday3())){
            sql.append("'"+timeTableDto.getTuesday3()+"',");
        }else{
            sql.append("'"+0+"',");
        }
        if(timeTableDto.getWednesday3()!=null&&!"undefined".equals(timeTableDto.getWednesday3())){
            sql.append("'"+timeTableDto.getWednesday3()+"',");
        }else{
            sql.append("'"+0+"',");
        }
        if(timeTableDto.getThursday3()!=null&&!"undefined".equals(timeTableDto.getThursday3())){
            sql.append("'"+timeTableDto.getThursday3()+"',");
        }else{
            sql.append("'"+0+"',");
        }
        if(timeTableDto.getFriday3()!=null&&!"undefined".equals(timeTableDto.getFriday3())){
            sql.append("'"+timeTableDto.getFriday3()+"',");
        }else{
            sql.append("'"+0+"',");
        }
        if(timeTableDto.getSaturday3()!=null&&!"undefined".equals(timeTableDto.getSaturday3())){
            sql.append("'"+timeTableDto.getSaturday3()+"',");
        }else{
            sql.append("'"+0+"',");
        }
        if(timeTableDto.getSunday3()!=null&&!"undefined".equals(timeTableDto.getSunday3())){
            sql.append("'"+timeTableDto.getSunday3()+"',");
        }else{
            sql.append("'"+0+"',");
        }


        if(timeTableDto.getMonday4()!=null&&!"undefined".equals(timeTableDto.getMonday4())){
            sql.append("'"+timeTableDto.getMonday4()+"',");
        }else{
            sql.append("'"+0+"',");
        }
        if(timeTableDto.getTuesday4()!=null&&!"undefined".equals(timeTableDto.getTuesday4())){
            sql.append("'"+timeTableDto.getTuesday4()+"',");
        }else{
            sql.append("'"+0+"',");
        }
        if(timeTableDto.getWednesday4()!=null&&!"undefined".equals(timeTableDto.getWednesday4())){
            sql.append("'"+timeTableDto.getWednesday4()+"',");
        }else{
            sql.append("'"+0+"',");
        }
        if(timeTableDto.getThursday4()!=null&&!"undefined".equals(timeTableDto.getThursday4())){
            sql.append("'"+timeTableDto.getThursday4()+"',");
        }else{
            sql.append("'"+0+"',");
        }
        if(timeTableDto.getFriday4()!=null&&!"undefined".equals(timeTableDto.getFriday4())){
            sql.append("'"+timeTableDto.getFriday4()+"',");
        }else{
            sql.append("'"+0+"',");
        }
        if(timeTableDto.getSaturday4()!=null&&!"undefined".equals(timeTableDto.getSaturday4())){
            sql.append("'"+timeTableDto.getSaturday4()+"',");
        }else{
            sql.append("'"+0+"',");
        }
        if(timeTableDto.getSunday4()!=null&&!"undefined".equals(timeTableDto.getSunday4())){
            sql.append("'"+timeTableDto.getSunday4()+"',");
        }else{
            sql.append("'"+0+"',");
        }


        if(timeTableDto.getMonday5()!=null&&!"undefined".equals(timeTableDto.getMonday5())){
            sql.append("'"+timeTableDto.getMonday5()+"',");
        }else{
            sql.append("'"+0+"',");
        }
        if(timeTableDto.getTuesday5()!=null&&!"undefined".equals(timeTableDto.getTuesday5())){
            sql.append("'"+timeTableDto.getTuesday5()+"',");
        }else{
            sql.append("'"+0+"',");
        }
        if(timeTableDto.getWednesday5()!=null&&!"undefined".equals(timeTableDto.getWednesday5())){
            sql.append("'"+timeTableDto.getWednesday5()+"',");
        }else{
            sql.append("'"+0+"',");
        }
        if(timeTableDto.getThursday5()!=null&&!"undefined".equals(timeTableDto.getThursday5())){
            sql.append("'"+timeTableDto.getThursday5()+"',");
        }else{
            sql.append("'"+0+"',");
        }
        if(timeTableDto.getFriday5()!=null&&!"undefined".equals(timeTableDto.getFriday5())){
            sql.append("'"+timeTableDto.getFriday5()+"',");
        }else{
            sql.append("'"+0+"',");
        }
        if(timeTableDto.getSaturday5()!=null&&!"undefined".equals(timeTableDto.getSaturday5())){
            sql.append("'"+timeTableDto.getSaturday5()+"',");
        }else{
            sql.append("'"+0+"',");
        }
        if(timeTableDto.getSunday5()!=null&&!"undefined".equals(timeTableDto.getSunday5())){
            sql.append("'"+timeTableDto.getSunday5()+"',");
        }else{
            sql.append("'"+0+"',");
        }

        if(timeTableDto.getU_acount()!=null&&!"".equals(timeTableDto.getU_acount())){
            sql.append("'"+timeTableDto.getU_acount()+"'");
        }else{
            sql.append("'"+0+"'");
        }

        sql.append(")");
        return sql.toString();
    }



    public String stuAttentComp(String stu_acount,String comp_acount){
        StringBuilder sql = new StringBuilder();
        sql.append(" insert into table_stuattentcomp_info(comp_acount,attent_time,u_acount) values( ");
        if(comp_acount!=null&&!"".equals(comp_acount)){
            sql.append("'"+comp_acount+"',");
        }else{
            sql.append("'"+0+"',");
        }
        sql.append("now(),");

        if(stu_acount!=null&&!"".equals(stu_acount)){
            sql.append("'"+stu_acount+"'");
        }else{
            sql.append("'"+0+"'");
        }
        sql.append(")");
        return sql.toString();
    }


    public String stuOnlineApplication(String stu_acount,String comp_acount,String wangshenjob){
        StringBuilder sql = new StringBuilder();
        sql.append(" insert into table_compattentstu_info(comp_acount,wangshenjob,attent_time,u_acount) values( ");
        if(comp_acount!=null&&!"".equals(comp_acount)){
            sql.append("'"+comp_acount+"',");
        }else{
            sql.append("'"+0+"',");
        }

        if(wangshenjob!=null&&!"".equals(wangshenjob)){
            sql.append("'"+wangshenjob+"',");
        }else{
            sql.append("'"+0+"',");
        }

        sql.append("now(),");

        if(stu_acount!=null&&!"".equals(stu_acount)){
            sql.append("'"+stu_acount+"'");
        }else{
            sql.append("'"+0+"'");
        }
        sql.append(")");
        return sql.toString();
    }

    public String delstuAttentComp(String acount,String comp_acount){
        StringBuilder sql = new StringBuilder();
        sql.append(" delete from table_stuattentcomp_info where 1=1");

        if(comp_acount!=null&&!"".equals(comp_acount)){
            sql.append("   and comp_acount = '"+comp_acount+"'");
        }else{
            sql.append(" and comp_acount = '"+0+"'");
        }
        if(acount!=null&&!"".equals(acount)){
            sql.append("   and u_acount = '"+acount+"'");
        }else{
            sql.append(" and u_acount = '"+0+"'");
        }
        return sql.toString();
    }


}


